<!--{include(pe_tpl('header_dialog.html'));}-->
<div class="tixing corg">提示：变更推荐人会重建所有用户的推荐层级表，不建议频繁变更，更不能多人同时操作变更！！</div>
<form method="post" id="form" autocomplete="off" onsubmit="return false;">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="wenzhang_border mat10">
<tr>
	<td class="bgtt" width="150">用户帐号：</td>
	<td>{$info['user_name']}</td>
</tr>
<tr>
	<td class="bgtt">当前推荐人：</td>
	<td>{$info['tguser_id']?$info['tguser_name']:'无'}</td>
</tr>
<tr>
	<td class="bgtt">新的推荐人：</td>
	<td>
		<input type="text" name="keyword" class="inputall input250" placeholder="请输入用户帐号/手机号" />
		<a href="javascript:user_getinfo();" class="btn_blue mal10" style="height:36px;line-height:36px;font-size:13px;">验证用户</a>
		<input type="hidden" name="tguser_id" value="0" />
		<div style="margin-top:5px; padding:10px; background:#f8f8f8; width:331px; line-height:30px">
			<p>用户帐号：<span id="tguser_name" class="mal10"></span></p>
			<p>真实姓名：<span id="tguser_tname" class="mal10"></span></p>
			<p>电话号码：<span id="tguser_phone" class="mal10"></span></p>
		</div>
	</td>
</tr>
</table>
<div class="center mat30">
	<input type="hidden" name="pesubmit" />
	<input type="hidden" name="pe_token" value="{$pe_token}" />
	<input type="button" value="提 交" class="tjbtn" />
</div>
</form>
<script type="text/javascript">
$(function(){
	$(":button").click(function(){
		pe_submit("{pe_nowurl()}", function(json){
			if (json.code == 1) pe_open('dialog', 1000);
		});
	})
})
//获取用户信息
function user_getinfo() {
	pe_get("admin.php?mod=user&act=getinfo&keyword="+$(":input[name='keyword']").val(), function(json){
		//pe_tip(json.show);
		if (json.code == 1) {
			$(":input[name='tguser_id']").val(json.data.user_id);
			$("#tguser_name").html(json.data.user_name);
			$("#tguser_tname").html(json.data.user_tname);
			$("#tguser_phone").html(json.data.user_phone);
		}
		else {
			$(":input[name='tguser_id']").val(0);
			$("#tguser_name").empty();
			$("#tguser_tname").empty();
			$("#tguser_phone").empty();
		}
	})
}
</script>
<!--{include(pe_tpl('footer_dialog.html'));}-->